package com.msy.controller;

import com.msy.mapper.UserMapper;
import com.msy.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @date 2020/11/18 - 15:13
 */
@RestController
public class UserController {
    @Autowired
    UserMapper userMapper;
    @RequestMapping("/find")
    public List<User> findUser(){
        return userMapper.findUser();
    }
    @RequestMapping("/findId/{id}")
    public User findUserById(@PathVariable("id")Integer id){
        return userMapper.findUserById(id);
    }
}
